package com.example.springmvc1.demos.controller;

import com.example.springmvc1.demos.POJO.UserEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import sun.security.util.Password;

@Controller
@ResponseBody
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/m1")
    public Object method_1(UserEntity user){
        return user;
    }

   /* @RequestMapping("/m1")
    public Object method_1(@RequestParam("userName") String name){
        System.out.println("参数 name："+name);
        return "Hi" + name;
    }*/

    /*@RequestMapping("/m1")
    public Object method_1(String name, String password){
        return "Hi" + name + ", password: " + password;
    }
*/

}
